using UnityEngine;

namespace SimpleCore
{
    public class PathTool
    {
        public static string GetAssetPath(string fullPath)
        {
            bool isFolderPath = !fullPath.Contains(".");
            var path = fullPath.Replace(Application.dataPath.Replace("Assets", ""), "");
            if (!path.EndsWith("/") && isFolderPath)
            {
                path += "/";
            }

            return path;
        }

        public static string GetFullPath(string assetsPath)
        {
            bool isFolderPath = !assetsPath.Contains(".");
            var path = Application.dataPath.Replace("Assets", "") + assetsPath;
            if (!path.EndsWith("/") && isFolderPath)
            {
                path += "/";
            }

            return path;
        }

    }
}